namespace DaoHang.Services
{
    /// <summary>
    /// 网站信息获取服务接口
    /// </summary>
    public interface IWebsiteInfoService
    {
        /// <summary>
        /// 根据URL获取网站信息
        /// </summary>
        /// <param name="url">网站URL</param>
        /// <returns>网站信息</returns>
        Task<WebsiteInfo> GetWebsiteInfoAsync(string url);

        /// <summary>
        /// 仅获取网站图标
        /// </summary>
        /// <param name="url">网站URL</param>
        /// <returns>仅包含图标URL的网站信息</returns>
        Task<WebsiteInfo?> GetIconOnlyAsync(string url);
    }

    /// <summary>
    /// 网站信息模型
    /// </summary>
    public class WebsiteInfo
    {
        /// <summary>
        /// 网站标题
        /// </summary>
        public string Title { get; set; } = string.Empty;

        /// <summary>
        /// 网站描述
        /// </summary>
        public string Description { get; set; } = string.Empty;

        /// <summary>
        /// 网站图标URL
        /// </summary>
        public string IconUrl { get; set; } = string.Empty;

        /// <summary>
        /// 网站内容（用于AI分析）
        /// </summary>
        public string Content { get; set; } = string.Empty;

        /// <summary>
        /// 是否获取成功
        /// </summary>
        public bool Success { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        public string ErrorMessage { get; set; } = string.Empty;
    }
} 